
#! /bin/bash

N=100000000
M=2
d=2
tmp=
out=out.txt

for (( j=0;j<7;j++))
	do 
		for(( k=0;k<7;k++))
			do
				while(( $d <= $M ))
					do
							for (( i=0; i<3; i++ ))
        							do
									tmp=`expr $N \/ $M` 							
    	            							`./ExtMSortBufferStream 1.txt $N $tmp $d >> out.txt`
								done
					d=`expr $d \* 2`
					done
			M=`expr $M \* 2`
			d=2
			done
	N=`expr $N \/ 10`
	M=2
	done
